add_definitions("-g -std=c++11")



# aux_source_directory(./logger LOGGER_SRC)
# aux_source_directory(./utils UTILS_SRC)

# add_executable(utils ${LOGGER_SRC} ${UTILS_SRC}) 





#add_executable(logger  ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
#add_executable(server ./utils/tcpServer.cc ./utils/IpAddressPort.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
#add_executable(client ./utils/tcpClient.cc ./utils/IpAddressPort.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
# add_executable(thread ./thread/thread.cc ./reactor/reactor.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
# add_executable(threadPool ./threadPool/threadPool.cc ./thread/thread.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
# add_executable(reactor ./reactor/reactor.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc ./view/view.cc)
# add_executable(controller ./controller/controller.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc ./view/view.cc)
# add_executable(view ./view/view.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
#add_executable(mainserver ./mainServer/mainServer.cc ./utils/tcpServer ./utils/IpAddressPort ./threadPool/threadPool.cc ./reactor/reactor.cc ./thread/thread.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)
#add_executable(sql ./mysql/Mysql.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc )

add_executable(mainserver ./mainServer/mainServer.cc ./redis/Redis.cc ./mysql/Mysql.cc ./utils/tcpServer ./utils/IpAddressPort ./threadPool/threadPool.cc ./reactor/reactor.cc ./thread/thread.cc ./logger/timeStamp.cc ./logger/message.cc ./logger/logger.cc)

# target_link_libraries(thread pthread event)
# target_link_libraries(reactor  event)
# target_link_libraries(threadPool pthread )

target_link_libraries(mainserver pthread event hiredis mysqlclient)


#target_link_libraries(sql mysqlclient)
#target_link_libraries(redis hiredis)